package com.showcai.service.impl;

import com.github.pagehelper.PageInfo;
import com.showcai.dao.MediaPushLogMapper;
import com.showcai.module.MediaPushLog;
import com.showcai.myRunTime.MyRunTimeExcption;
import com.showcai.service.MediaPushLogService;
import com.showcai.service.ServiceBase;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by Baggio on 2018-8-21.
 */
@Service
public class MediaPushLogServiceImpl extends ServiceBase implements MediaPushLogService {
    @Autowired
    MediaPushLogMapper mediaPushLogMapper;

    @Override
    public void addMediaPushLog(MediaPushLog mediaPushLog) {
        mediaPushLogMapper.insertMediaPushLog(mediaPushLog);
    }

    @Override
    public void deleteMediaPushLogBydevicId(String devicId) {
        if (StringUtils.isBlank(devicId)) {
            throw new MyRunTimeExcption("devicId is null");
        }
        mediaPushLogMapper.deleteMediaPushLogBydevicId(devicId);
    }

    @Override
    public PageInfo selectMediaPushLogList(Map<String, String> map) {
        return null;
    }
}
